package com.itheima.service;

import com.itheima.Cache;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Slf4j
@Service
public class DeptServiceImpl implements DeptService{
    @Autowired
    private DeptService deptService;
    @Override
    public void addDept() {
        log.info("添加部门信息");
    }

    @Override
    @Cache
    public void updateDept() {
        log.info("更新部门");
    }

    @Override
    @Cache
    public String after(Integer id) {
        return "Spring通知的测试";
    }

    @Override
    @Cache
    public void afterThrow() {
        log.info("用户执行目标方法");
        int a = 1/0;
    }

    @Override
    @Cache
    public void doAround() {
        log.info("实现用户数据的入库操作");
    }

    @Override
    @Cache
    public void doOrder() {
        log.info("测试程序执行的顺序");
    }
}
